<%@tag description="Page template" pageEncoding="UTF-8"%>
<%@attribute name="title" fragment="true" %>
<html>
<head>

<% 
	String admin = "false";
	String redakteur = "false";
	String dezernat2 = "false";
	String verantwortlicher = "false";
	
	if(session.getAttribute("admin") != null) {
		admin = (String) session.getAttribute("admin");
	}
	if(session.getAttribute("redakteur") != null) {
		redakteur = (String) request.getAttribute("redakteur");
	}
	if(session.getAttribute("verantwortlicher") != null) {
		verantwortlicher = (String) request.getAttribute("verantwortlicher");
	}
	if(session.getAttribute("dezernat2") != null) {
		dezernat2 = (String) request.getAttribute("dezernat2");
	}
%>

<script type="text/javascript" src="javascript/jquery.min.js"></script>
<script type="text/javascript" src="javascript/jquery-ui.custom.min.js"></script>
<script type="text/javascript" src="javascript/jquery.cookie.js"></script>
<script type="text/javascript" src="javascript/jquery.dynatree.js"></script>
<% if(admin.equals("true")) { %>
<script type="text/javascript" src="javascript/custom_drag.js"></script>
<% } else { %>
<script type="text/javascript" src="javascript/custom.js"></script>
<% } %>
<link type="text/css" href="css/layout.css" media="all" rel="stylesheet" />
<link type="text/css" href="css/skin/ui.dynatree.css" media="all" rel="stylesheet" />
<title><jsp:invoke fragment="title"/></title>
 




</head>
<body>
	<div class="top">
		<div class="nav1"><br>
			<span><a href="#">Home</a>
			<% if(admin.equals("true") || redakteur.equals("true") || dezernat2.equals("true") || verantwortlicher.equals("true")) { %>
			 
			 | <a href="#">Einstellungen</a> | <a href="javascript:$('#logout').submit();">Logout</a> 
			 <form method="post" action="index.html" id="logout"><input type="hidden" name="logout" value="true" /></form>
			 <% } %>
			 </span>
		</div>
		<div class="nav2">&nbsp;</div>
		<div class="nav3">
			Modulmanagementsystem
			<input type="text" class="suche" name="suche" />
		</div>
	</div>
	<div>
		<div class="left">
			<% if(redakteur.equals("true") || dezernat2.equals("true") || verantwortlicher.equals("true")) { %>
			<h1>Aufgaben</h1>
			<ul>
				<li>Einführung in die Informatik</li>
				<li>Softwaregrundprojekt</li>
			</ul>
			<% } %>
			<% if(admin.equals("true") || redakteur.equals("true") || dezernat2.equals("true") || verantwortlicher.equals("true")) { %>
			<h1>Navigation</h1>
			<div id="tree"></div>
			<% } %>
			<% if(admin.equals("true")) { %>
			<div id="draggable" class="ui-widget-content">neues Element</div>
			<% } %>
			<% if(admin.equals("true")) { %>
			<h1>Benutzerverwaltung</h1>
			<ul>
				<li><a href="BenutzerListe">Benutzerverwaltung</a></li>
				<li>neuer Benutzer</li>
			</ul>
			<% } %>
			<% if(!admin.equals("true") && !redakteur.equals("true") && !dezernat2.equals("true") && !verantwortlicher.equals("true")) { %>
			<h1>Login</h1>
			<form method="POST" action="index.html">
				<input type="text" name="email" />
				<input type="password" name="passwort" />
				<input type="submit" value="Login" />
				<% if(request.getAttribute("passwortfehler") != null) { %>
					E-Mail-Adresse oder Passwort falsch.
				<% } %>
			</form>
			<% } %>
		</div>
		<div class="resize">&nbsp;</div>
		<div class="main">
			<div class="content">
				<jsp:doBody/>
			</div>
		</div>
		<div class="clearer"></div>
	</div>

</body>
</html>